package com.zjh.admin.app.service.impl;

import com.zjh.admin.app.mapper.CommentMapper;
import com.zjh.admin.app.model.CommentEntity;
import com.zjh.admin.app.service.CommentService;
import com.zjh.core.base.baseservice.impl.AbstractService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

/**
 * @Author WYX
 * @Description TODO
 * @Date 2019/11/17 18:18
 */
@Service("commentService")
public class CommentServiceImpl extends AbstractService<CommentEntity,Long> implements CommentService {
    @Autowired
    private CommentMapper commentMapper;
    @Autowired
    public void setBaseMapper() {
        super.setBaseMapper(commentMapper);
    }

    @Override
    public List<CommentEntity> queryListByVideo(int vId) {
        return commentMapper.queryListByVideo(vId);
    }

    @Override
    public List<CommentEntity> queryListByUser(int uId) {
        return commentMapper.queryListByUser(uId);
    }

    @Override
    public int countCommentByUid(int uId) {
        return commentMapper.countCommentByUid(uId);
    }
}
